﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//using PowerCreator.LMS.Model.Entity;
//using PowerCreator.LMS.Logic.CourseManager;
//using PowerCreator.LMS.Logic.Common;
using System.Text;

public partial class sysadmin_CourseManager_ChangeCouseType : PowerCreator.LMS.Web.Base.BasePage
{
    //ManagerCourseInfo manager = new ManagerCourseInfo();
    //ManagerCourseType objtype = new ManagerCourseType();

    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!IsPostBack)
        //{

        //    Pageload();
            
            
        //}
    }
    private ArrayList GetIDList(string str)
    {
        ArrayList list = new ArrayList();
        string[] temp = str.Split(',');
        for (int i = 0; i < temp.Length; i++)
        {
            list.Add(temp[i].ToString());
        }
        return list;
    }
    private void Pageload()
    {
        //DropDownList1.DataSource = objtype.Query("");
        //DropDownList1.DataTextField = "TypeName";
        //DropDownList1.DataValueField = "TypeID";
        //DropDownList1.DataBind();
    }

    protected void Submit_ServerClick(object sender, EventArgs e)
    {
        //PowerCreator.LMS.Model.Entity.CourseInfo info = new CourseInfo();
        //string ilist = Request.QueryString["il"].ToString();
        //ilist = Base64.Decode(ilist);
        //ArrayList list = new ArrayList();
        //list = GetIDList(ilist);
        //int coursetypeID=int.Parse(DropDownList1.SelectedValue.ToString());
        //string msg = string.Empty;

        //int errcount = 0;
        //int sullcount = 0;

        //for (int i = 0; i < list.Count; i++)
        //{
        //    info=manager.Load(int.Parse(list[i].ToString()));
        //    info.CourseTypeID = coursetypeID;
        //    if (manager.Update(info))
        //    {
        //        sullcount++;
        //    }
        //    else
        //    {
        //        errcount++;
        //    }
        //}
        //int cout = sullcount + errcount;
        //msg = string.Format("总共更新了 {0} 条记录,成功更新了 {1} 条,更新失败了 {2} 条!", cout.ToString(), sullcount.ToString(), errcount.ToString());
        //Script.Alert(this, "", msg);
        //Script.ReloadParent();
    }
}
